import { lazy } from "react";

import * as Type from '../type/index'


export let homeRouter: Type.RouterList = [
    {
        path: '/home/selected',
        title: '精选推荐',
        icon: 'HomeFilled',
        element: lazy(() => import('../page/home/Selected'))
    },
    {
        path: '/home/work',
        title: '工作台',
        icon: 'LaptopOutlined',
        element: lazy(() => import('../page/home/Work'))
    },
    {
        path: '/home/design',
        title: '偏好设计',
        icon: 'PlusSquareFilled',
        element: lazy(() => import('../page/home/Design'))
    },
    {
        path: '/home/setup',
        title: '偏好设置',
        icon: 'SettingFilled',
        element: lazy(() => import('../page/home/Setup'))
    },
    {
        path: '/home/collection',
        title: '我的收藏',
        icon: 'StarFilled',
        element: lazy(() => import('../page/home/Collection'))
    },
]


let router: Type.RouterList = [
    {
        path: '/',
        to: '/home/selected',
    },
    {
        path: '/login',
        title: '登录',
        element: lazy(() => import('../page/Login'))
    },
    {
        path: '/work',
        title: '空白页',
        element: lazy(() => import('../page/WorkKong'))
    },
    {
        path: '/home',
        title: '主页',
        element: lazy(() => import('../page/Home')),
        children: homeRouter
    }
]

export default router